<?php
	require_once("global.php");
	require_once("modules/security_mod.php");
	require_once("modules/level_mod.php");
	require_once("alerter/modules/account_mod.php");

	SecurityMod::login();

	$level = $_SESSION["account"]->getLevel();
	if ($level != 'Admin')
		SecurityMod::logout();


	$validation= v($_REQUEST, "validation");

	$acc = AlertAccountMod::getAccount(v($_REQUEST, "pilot"));

	AlertAccountMod::updateValidation($acc->getName(), $validation);

	header('location: alert_accounts.php');
?>